import Vue from 'vue';
import Vant from 'vant';
import 'vant/lib/index.css';
import App from './App.vue';
import router from './router';
// import './assets/main.css';
import { serverUrl } from './utils/tools';
import './assets/main.css'

Vue.use(Vant);
Vue.config.productionTip = false;
Vue.filter('dalImg', (url) => {
  if (url) {
    if (url.startsWith('http')) {
      return url;
    }
    return `${serverUrl}${url}`;
  }
  return 'https://img2.baidu.com/it/u=4252538614,111390908&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500';
});
new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app');
